package LC;

/**
 * @ClassName LC9
 * @Description: TODO
 * @Author hl
 * @Date 2020/9/13
 * @Version V1.0
 **/
public class LC9 {
    public boolean isPalindrome(int x) {
        if(x<=0){
            return false;
        }
        String s=String.valueOf(x);
        for(int i=0,j=s.length()-1;i<j;i++,j--){
            if(s.charAt(i)!=s.charAt(j)){
                return  false;
            }
        }

       return true;
    }
}
